package com.ymatou.query.trading.api.testcase;

import org.junit.After;
import org.junit.AfterClass;
import org.junit.Before;
import org.junit.BeforeClass;
import org.junit.Test;
import org.junit.experimental.categories.Category;

import com.ymatou.query.trading.api.parameter.GetOrderCreditListBean;
import com.ymatou.query.trading.api.service.GetOrderCreditListCall;
import com.ymt.core.tool.Logger;
import com.ymt.utils.annotation.TestCase;
import com.ymt.utils.annotation.TestSuite;
import com.ymt.utils.tag.P1;
import com.ymttest.utils.constant.ECode;

/**
 * 获取维权订单列表 FreeMaker Template自动生成代码
 */
@TestSuite
public class Ts_GetOrderCreditList {

	private static GetOrderCreditListBean goclbean;
	private static GetOrderCreditListCall goclcall;

	@BeforeClass
	public static void setUp() {
		Logger.createResultFile("获取维权订单列表");
	}

	@Before
	public void caseUp() {

		goclbean = new GetOrderCreditListBean();
		goclcall = new GetOrderCreditListCall();
	}

	@AfterClass
	public static void tearDown() {
		Logger.generateResult(goclcall.getOpurl());
	}

	@After
	public void caseDown() {
		Logger.end();
	}

	@Test
	@Category(P1.class)
	@TestCase
	public void Tc_GetOrderCreditList_001() {
		Logger.start(true,"获取维权订单列表成功");
		try {
			goclbean.setOrderId(100004924);
			goclcall.setData(goclbean);
			goclcall.callService();
			Logger.comment("goclcall send:" + goclcall.getEntityString());
			Logger.comment("goclcall response:" + goclcall.getReturnData());
			Logger.verifyEquals(ECode.SUCCESS, goclcall.getCode(), "验证Code");
			// Logger.verifyEquals(ErrorCode.SUCCESSMSG, goclcall.getMsg(),
			// "验证Msg");
		} catch (Exception e) {
			Logger.fail(e);
		}
	}
}